<%@page import="java.util.ArrayList"%>
<%@page import="com.mongodb.DBObject"%>
<%@page import="com.mongodb.DBCursor"%>
<%
ArrayList<DBObject> list = (ArrayList<DBObject>) request.getAttribute("list");
for(int i=0;i<list.size();i++)
{
	DBObject dbObject = list.get(i);
	if(dbObject.get("reglink")!=null)
	out.print("<div>Title Link Selector   : <b>"+dbObject.get("reglink")+"</b> ( <a href='javascript:void(0)' style='display:inline;' class='addreg' title='reglink' rel='"+dbObject.get("reglink")+"'>Use</a> ) </div>");
	out.print("<div>Title Selector   : <b>"+dbObject.get("regtitle")+"</b> ( <a href='javascript:void(0)' style='display:inline;' class='addreg' title='regtitle' rel='"+dbObject.get("regtitle")+"'>Use</a> )</div>");
	out.print("<div>Content Selector   : <b>"+dbObject.get("regcontent")+"</b> ( <a href='javascript:void(0)' style='display:inline;' class='addreg' title='regcontent' rel='"+dbObject.get("regcontent")+"'>Use</a> )</div>");
	out.print("<div>Remove Selector     : <b>"+dbObject.get("regremove")+"</b> ( <a href='javascript:void(0)' style='display:inline;' class='addreg' title='regremove' rel='"+dbObject.get("regremove")+"'>Use</a> ) </div><hr/>");
}
%>
<script type="text/javascript">
	$(document).ready(function(){
		$(".addreg").click(function(){
			$("#"+$(this).attr("title")).val($(this).parent().find("b").html().replace("&gt;",">").replace("&lt;","<"));
		});
	});
</script>